use serde::{Deserialize, Serialize};
use serde_json::Value;
#[derive(Debug,Deserialize,Serialize)]
pub struct UserPageItem{
    pub id: String,
    pub name: String,
}

#[derive(Debug,Serialize, Deserialize)]
pub struct UserPageRequest{
    pub id: Option<String>,
    pub name: Option<String>,
}

#[derive(Debug,Clone,Serialize)]
pub struct CurrentUser { 
    pub user_id: String,
    pub user_name: String,
}

impl Into<Value> for CurrentUser {
    fn into(self) -> Value {
        serde_json::to_value(self).unwrap()
    }
}